﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;

namespace BLL
{
    public class UrlBs

    {
        private readonly UrlDb _db;

        public UrlBs()
        {
            _db = new UrlDb();
        }

        public IEnumerable<BOL.tbl_Url> GetAll()
        {
            return _db.GetAll();
        }

        public BOL.tbl_Url GetById(int id)
        {
            return _db.GetById(id);
        }

        public void Insert(BOL.tbl_Url url)
        {
            _db.Insert(url);
        }

        public void Update(BOL.tbl_Url url)
        {
            _db.Update(url);
        }

        public void Delete(int id)
        {
            _db.Delete(id);
        }
    }
}
